[mirrors]
http://hostap.epitest.fi/releases/wpa_supplicant-1.0.tar.gz

[main]
filesize=1948417
sha512=50207c9f7e088e80315f33d1d1c32b6496c9eed606d909ace25813b33f10d9efaf45d83a1386bbec8ac690a9baf398331197d526665107b04d096fbd19239bd1

[deps]
libnl-tiny
openssl
zlib

[build]
patch -p1 < "$K"/wpa_supplicant-fflush.patch || exit 1
cd wpa_supplicant
cp defconfig .config

CFLAGS="-D_GNU_SOURCE -I$butch_prefix/include/libnl-tiny \
  -DLIBNL1_COMPAT \
  -DCONFIG_LIBNL20 \
  -D__int32_t=int32_t -D__int16_t=int16_t -D__uint8_t=uint8_t \
  -D__uint32_t=uint32_t -D__uint16_t=uint16_t \
  -include stdint.h $optcflags" \
  LDFLAGS="-lz $optldflags" make -j$MAKE_THREADS CONFIG_LIBNL_TINY=y || exit 1
make BINDIR=/bin DESTDIR="$butch_install_dir" install || exit 1

install -D -m 600 "$K"/wpa_supplicant.conf "$butch_install_dir""$butch_prefix"/etc/wpa_supplicant.conf

IS="$K"/bin/install-service
"$IS" --down --log --force wpa_supplicant "$K"/services/wpa_supplicant
